#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "include/vector.h"

int main(int argc, char *argv[]) {
    Vector vector; 
    VectorNew(&vector); // 构造初始化

    for(int i = 0; i < 10; i++) 
        VectorAddLast(&vector, i);
    VectorString(&vector); 

    VectorRemove(&vector, 2);
    VectorString(&vector); 
    VectorAdd(&vector, 1, 100);
    VectorString(&vector); 

    int exists = VectorContains(&vector, 100);
    if (exists == 1)
        printf("v = %d, exist 100\n", exists); 
    
    exists = VectorContains(&vector, 200); 
    if (exists == -1)
        printf("v = %d, not exist 200\n", exists); 

    for (int i = 0; i < 9; i++)
        VectorRemoveFirst(&vector); 
    VectorString(&vector); 
    VectorDispose(&vector);  // 析构
    return 0; 
}